package com.yxmadoc.umlproject.service;

import com.yxmadoc.umlproject.model.Order;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

public interface OrderService {

	// 创建工单
	// 编辑工单信息
	Order save(Order order);

	// 删除（取消）工单
	void delete(Integer orderId);

	// 业主选择师傅
	Order customerRepairerSelection(Integer priceId, Integer orderId);

	// 根据客户ID获取工单
	Page<Order> listByCustomer(String customerId, Pageable pageable);

	// 根据维修员ID获取工单
	Page<Order> listByRepairer(String repairerId, Pageable pageable);

	// 根据工单ID获取工单
	Order findOne(Integer orderId);

	// 师傅发现新订单
	Page<Order> listByQuotatedFalse(Pageable pageable);

	// 业主发现未评价订单
	Page<Order> listByCommentedFalse(String customerId, Pageable pageable);

	// 评价订单
	Order comment(Order order);

	// 结单
	Order completeOrder(Integer orderId);

}
